package com.flextribe
{
	import flash.geom.Point;
	
	public class CasaUtilsTmp
	{
		public static function degreesToRadians(degrees:Number):Number {
			return degrees * (Math.PI / 180);
		}
		public static function radiansToDegrees(radians:Number):Number {
			return radians * (180 / Math.PI);
		}
		public static function rotatePoint(point:Point, centerPoint:Point, angle:Number):void {
			var radians:Number = degreesToRadians(angle);
			var baseX:Number   = point.x - centerPoint.x;
			var baseY:Number   = point.y - centerPoint.y;
			
			point.x = (Math.cos(radians) * baseX) - (Math.sin(radians) * baseY) + centerPoint.x;
			point.y = (Math.sin(radians) * baseX) + (Math.cos(radians) * baseY) + centerPoint.y;
		}
	}
}